//
//  JZHBlackCardCell.m
//  极致荟
//
//  Created by mac on 14-4-30.
//  Copyright (c) 2014年 mac. All rights reserved.
//

#import "JZHBlackCardCell.h"

@implementation JZHBlackCardCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // Initialization code
        //加载nib
        NSArray *arrayOfViews = [[NSBundle mainBundle] loadNibNamed:@"JZHBlackCardCell" owner:self options:nil];
        if (arrayOfViews.count < 1) {
            return nil;
        }
        if (![[arrayOfViews objectAtIndex:0] isKindOfClass:[JZHBlackCardCell class]]) {
            return nil;
        }
        
        self = [arrayOfViews objectAtIndex:0];
    }
    return self;
}

- (void)addclldata:(JZHActivities *)act
{
    self.citiletel.text=act.acttile;
    [ImageCache imageUrl:act.actimage UiImageview: self.ciimage ];
    self.cityname.text=act.cityname;
    NSDateFormatter *form=[[NSDateFormatter alloc]init];
    [form setDateFormat:@"dd"];
    self.ciday.text=[form stringFromDate:act.actdate];
    [form setDateFormat:@"MM"];
    
    self.muect.text=[self menunint:[[form stringFromDate:act.actdate] intValue]];
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (NSString *)menunint:(int)i
{
    NSString *str=@"";
    switch (i) {
        case 1:
            return  str=@"Jan";
            break;
        case 2:
            return  str=@"Feb";
            break;
        case 3:
            return  str=@"Mar";
            break;
        case 4:
            return  str=@"Apr";
            break;
        case 6:
            return  str=@"Jun";
            break;
        case 7:
            return  str=@"Jul";
            break;
        case 8:
            return  str=@"Aug";
            break;
        case 9:
            return  str=@"Sep";
            break;
        case 10:
            return  str=@"Oct";
            break;
        case 11:
            return  str=@"Nov";
            break;
        case 12:
            return  str=@"Dec";
            break;
        default:
            return @"";
            break;
    }
}
@end
